// 导入 
import BaseAPI from './baseapi'
import StaffApi from './staff';
import PlaceApi from './place';
import TaskOrderAPI from './taskorder'
import PermissionAPI from './permission'
import RolesAPI from './roles'
import RolesPerDetailApi from './rolesperdetail';

// 实例化对象 
const branchObj = new BaseAPI('basic', 'branchs');
const areaObj = new BaseAPI('basic', 'branchareas');
const placeObj = new PlaceApi('basic', 'areaplaces');
const staffObj = new StaffApi('user', 'staffs')
const positionObj = new BaseAPI('user','positions');
const buttonObj = new BaseAPI('user', 'buttons');


// 任务类型的接口
const taskTypeObj = new BaseAPI('basic', 'tasktypes');
// 任务状态的接口
const taskStatusObj = new BaseAPI('basic', 'taskstatus');
// 实例化任务工单
const taskorderObj = new TaskOrderAPI('task', 'taskorders');
// 角色接口
const rolesObj = new RolesAPI('user','roles');
// 权限 
const permissionObj = new PermissionAPI('user','permissions')

const rolesperdetailObj = new RolesPerDetailApi('user', 'rolesperdetails')

// 暴露
export default {
    Branch: branchObj, 
    Area: areaObj,
    Place: placeObj,
    Staff: staffObj,
    Position: positionObj,
    TaskOrder: taskorderObj,
    TaskType: taskTypeObj,
    TaskStatus: taskStatusObj,
    Roles: rolesObj,
    Permission: permissionObj,
    Button: buttonObj,
    RolesPerDetail: rolesperdetailObj
}